home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / antenna / azproj10 / simpson.doc < prev    next >
Text File  |  1995-07-19  |  25KB  |  473 lines

  1. --
  2.  
  3. Following is Wayne Simpson's article on NMEA-0183
  4.  
  5. _______________________________________________________________________
  6. M. Burc Oral                           |                               |
  7. Earth Resources Laboratory             |      voice: (617) 253-2471    |
  8. Massachusetts Institute of Technology  |      fax:   (617) 253-6385    |
  9. 42 Carleton St.   E34-356A,            |   internet: oral@gps.mit.edu  |
  10. Cambridge, MA 02142, USA               |                               |
  11.                                        |  anonymous ftp: gps.mit.edu   |
  12.              web address -->   http://www-erl.mit.edu/gps/gpshome.html |
  13. -----------------------------------------------------------------------
  14.  
  15.  
  16. ******************
  17.  
  18. Wayne Simpson   wms@spin.ho.att.com
  19.  
  20.  
  21.  
  22.           UNDERSTANDING MARINE ELECTRONICS INTERFACING:
  23.                     the Promise, the Problems
  24.  
  25.                 by Wayne Simpson, Technical Editor
  26.               International  Catalina 27 Association
  27.  
  28.      The  coming of the microprocessor to marine electronics  has
  29. brought with it a promise and a curse. The promise is that two or
  30. more  devices can share information and so become  more  valuable
  31. and convenient to use. The curse is that not all marine  hardware
  32. is compatible. To make matters worse, marine electronics manufac-
  33. turers  often make it difficult for the consumer to tell  whether
  34. any two devices will work together until bought and wired togeth-
  35. er. Sometimes the result is a happy event. At other times, it can
  36. be an exercise in frustration.
  37.      An  interface is the boundary at which two independent  sys-
  38. tems  communicate  and interact. When you  connect  an  interface
  39. cable  from  your loran to your autopilot, the wire is  like  the
  40. string between two cans in a play telephone. The wire carries the
  41. conversation,  but it is the interfaces at each end that  do  the
  42. talking.  If  the  two devices speak the same  language  and  can
  43. understand the same words, then they can communicate.  Otherwise,
  44. they can't. There is a standard for communications in the  marine
  45. electronics  industry, and most manufacturers claim to  abide  by
  46. it, at least in part. Unfortunately this is not always enough.
  47.  
  48.  
  49.             NMEA 0183: The Marine Interface Standard
  50.  
  51.      In  1980, a group of professionals from the industry met  to
  52. develop  a standard "language" for marine interfaces. The  result
  53. was  the   National Marine Electronics  Association  (NMEA)  0180
  54. standard.  It  addressed one problem, that of making  lorans  and
  55. autopilots work together, and it was a success. In the  following
  56. years this standard, revised, broadened, then totally revamped to
  57. take  into  account the wide range of  electronics  appearing  on
  58. boats,  led to the current NMEA 0183 standard used on almost  all
  59. equipment today.
  60.      The  NMEA 0183 standard calls for data communication in  the
  61. form of coded "sentences." Each sentence begins with the  charac-
  62. ter "$" and ends with a carriage return and line feed (<CR><LF>).
  63. These  last two characters are "control" characters and  are  not
  64. normally  printed  (for this reason they  are  customarily  shown
  65. enclosed  in  brackets). Between the beginning and  end  of  each
  66. sentence  are "fields" of data, each field separated by a  comma.
  67. The  first  field in any sentence (field 0) begins with  the  two
  68. letter talker mnemonic code ("talkers" are devices that send  out
  69. information,  "listeners"  take  it in)  followed  by  the  three
  70. letter code for the sentence. Data follows in the standard format
  71. for that sentence. Here's an example:
  72.  
  73.       field #:    0     1     2   3      4
  74.      sentence: $LCGLL,4001.74,N,07409.43,W<CR><LF>
  75.  
  76.      What is being said here? Lets look at it field by field. The
  77. sentence  begins  with the start character "$."  Next  comes  the
  78. talker identifier and sentence format code. LC stands for  Loran-
  79. C,  GLL  for present position in Lat/Lon. Field  1  contains  the
  80. set's  current  latitude. Field 2 is either N or S for  North  or
  81. South. Field 3 is the set's current longitude. Field 4 is W or  E
  82. for  West  or East. Thus, this sentence  reads  "Loran-C  present
  83. position  in Lat/Lon: 40 degrees 1.74 minutes North,  74  degrees
  84. 9.43  minutes  West." A carriage return and line feed  close  the
  85. sentence.  The GLL sentence is always displayed in  this  format.
  86. Each  type of sentence, and there are many, has its own  specific
  87. standard  format  (for a brief catalog of formats,  see  sidebar:
  88. Deciphering the Code).
  89.      Standard  sentences, each in a standard format. This is  how
  90. NMEA  0183 is intended to work. But compliance with the  standard
  91. is  voluntary. It is up to the manufacturers to decide  how  they
  92. will implement the standard, and to what extent they will  comply
  93. with  it. Because the standard is so broad, there is  often  more
  94. than one way to express the same information, and this can  cause
  95. problems.  There  are many different sentences, and  few  if  any
  96. talker  devices say them all, or adhere strictly to the  standard
  97. format of those they do. Does your autopilot need information  in
  98. a form that your loran isn't sending out? How can you tell?
  99.      Don't  count on there being an adequate explanation  in  the
  100. manuals,  because often it isn't there. The owners manual for  my
  101. loran  describes  the workings of the interface  this  way.  "The
  102. extra connector on the rear panel is a serial data output  inter-
  103. face which can provide loran data to an autopilot, track plotter,
  104. or  fishfinder.  The serial data is in NMEA 0183  format  and  is
  105. transmitted  continuously." That's it; the manual makes no  other
  106. mention of the interface anywhere.  Other manuals I have seen are
  107. about  as  descriptive.  In a follow-up bulletin  nearly  a  year
  108. after  I  bought it the manufacturer of my loran  mentioned  what
  109. sentences the data output sent (there were four) and what the pin
  110. assignments  for  the  output connector were.  This  section  was
  111. labeled "for techies only." These interfaces are touted in adver-
  112. tising copy, but it's clear the manufacturers don't really expect
  113. you to use them.  In the end, you probably will have to call  the
  114. manufacturer for a proper explanation of their interface, and ask
  115. specifically  whether  they have tested the devices you  have  in
  116. mind for compatibility.
  117.      So far we've discussed only software incompatibilities,  but
  118. there can be physical ones, too. NMEA 0183 specifies no  standard
  119. connector,  and  no two manufacturers seem to use the  same  one.
  120. Usually, the owner will have to buy plugs from the  manufacturers
  121. and make his own cable.
  122.  
  123.  
  124.                          A Case History
  125.  
  126.      Two years ago, when I bought my West Marine Vector I  loran,
  127. I  had no intentions of ever using the interface. Why  would  you
  128. want to interface your electronics, anyway? Here's one example. A
  129. loran can tell you where you are, what direction to steer to  get
  130. to  your destination, and how far off your intended course  track
  131. you are. By itself, however, it can't steer the boat. An  autopi-
  132. lot  can steer, but on its  own can't compensate for currents  or
  133. leeway.  An  autopilot interfaced with a loran can do  all  these
  134. things,  and then some. Here's another example. The more you  use
  135. the  magic  box, the more you realize the  information  it  gives
  136. should  be displayed in the cockpit, where the helmsman can  have
  137. instant access to it. But the cockpit can be a harsh location for
  138. electronics  and  most lorans aren't truly  waterproof.  A  loran
  139. "repeater,"  which echoes steering information on a  remote  dis-
  140. play,  can  provide useful steering information  in  the  cockpit
  141. while  leaving the loran below in the nav station, safe from  sun
  142. and spray.
  143.      An  integrated pilot/navigator system would have been  nice,
  144. but  LEGACY, our 1977 Catalina 27, already had an  autopilot,  an
  145. old  style  Autohelm 800. It worked perfectly well and  I  wasn't
  146. going  to replace it just to have one with an interface. A  loran
  147. repeater  would  be handy too, but those  available  commercially
  148. cost as much as a second loran. I toyed with the idea of building
  149. a repeater but in the end dismissed the whole thing as not  being
  150. worth the time, effort, or cost.
  151.      Two  things happened last summer that changed my opinion  on
  152. interfacing. First, the old Autohelm failed, and the cost to  fix
  153. it was almost as much as a new digital autopilot. I went for  the
  154. new pilot,  settling on a Navico Tillerpilot 5000 largely because
  155. Autohelm  had  changed their mounting dimensions and  would  have
  156. required  me to change my setup. Navico's dimensions were  always
  157. very  close the old Autohelm's, and would fit  without  modifica-
  158. tions.
  159.      The  new  pilot worked well all by itself, but  an  item  on
  160. Navico's  option list caught my eye. It was a digital  hand  pro-
  161. grammer  that made the TP5000 a much better pilot.  It  displayed
  162. present  heading  from  the pilot's  internal  fluxgate  compass,
  163. allowed you to make course changes in degrees rather than  beeps,
  164. had an off-course alarm and let you program the pilot's  response
  165. parameters  to better tune them to the boat and conditions.  Also
  166. at  the time, if you bought a pilot and programmer and  sent  the
  167. receipts  to Navico, they would send you the loran interface  box
  168. (which normally cost's $150 at discount) for free.
  169.      Second,  while  at a marine warehouse sale, I came across  a
  170. KVH model LRX+ loran repeater. It was complete with the  warranty
  171. card and instruction booklet. Its  price was $100, 1/3 the  usual
  172. discount price. It was NMEA 0183 compatible, and so was my loran.
  173. It even had a sheet with a listing of all the lorans the LRX+ had
  174. successfully interfaced with. The Vector was there, right at  the
  175. bottom of the list. Why not?
  176.      I  took it down to my boat, hooked it up to the NMEA  inter-
  177. face  on  the back of my loran, programmed a course to  a  nearby
  178. buoy,  and waited for the repeater's display to come to life.  It
  179. did,  and showed a bearing that was 12 degrees off! Something  in
  180. the back of my mind reminded me that the magnetic variation in my
  181. area  was 12 degrees. The repeater was displaying bearing in  de-
  182. grees  true  rather than magnetic. Every time I wanted to  get  a
  183. steering course off the display, I would have to do a calculation
  184. in my head. The "curse" had visited me.
  185.      I  was now in the position of having to figure out what  the
  186. problem  was  with the repeater. I had no knowledge of  the  NMEA
  187. standard or how it worked, so I called KVH. They said that  what-
  188. ever the loran was sending out over the interface was reported on
  189. the display. I called West Marine to find out what the Vector was
  190. sending  out. They told me that both true and  magnetic  bearings
  191. were  sent, and that it was up to the repeater  to  differentiate
  192. between  them.  I asked KVH for more help, and  they  offered  to
  193. upgrade the repeater's software to a newer version at no  charge.
  194. I sent the repeater off to KVH Industries in Middletown, RI.
  195.      While the repeater was away, I took a sample of the Vector's
  196. data output using my PC. The procedure is described in the  side-
  197. bar: Listening In, Speaking Out. Here's what I got:
  198.  
  199.       $LCGLL,4004.22,N,07409.78,W
  200.       $LCBWC,,4001.80,N,07403.66,W,117,T,129,M,005.2,N,011
  201.       $LCAPA,V,A,1.00,R,N,V,V,117,T,011
  202.       $LCVTG,,,271,M,02.3,N,,
  203.  
  204.      The  pattern  of four sentences repeated  itself  every  two
  205. seconds. Close inspection of this string revealed the problem. In
  206. order  to work with a wide variety of lorans, the KVH  repeater's
  207. program  accepts  data from several different sentences,  two  of
  208. which,  BWC  (bearing  to waypoint along great  circle)  and  APA
  209. (autopilot format A), appear in the above sample. Look closely at
  210. the  APA  sentence. Data fields 8 and 9 display the  bearing  and
  211. whether  it  represents degrees true or  magnetic.  The  standard
  212. format for APA is degrees magnetic, in this example it is degrees
  213. true. There was a bug in the Vector's software.
  214.      Why  couldn't the repeater see that the bearing was  in  de-
  215. grees  true and disregard it? Most of these programs  are  "comma
  216. counters."  They  recognise a sentence of interest from  the  ad-
  217. dress,  then  count commas until they get to the field  in  which
  218. they expect to find data they need. They don't look at the fields
  219. telling whether the information is true, magnetic, east, or west.
  220.      The  people at KVH felt confident that the software  upgrade
  221. would  cure  this condition but when the repeater came  back,  my
  222. problem  was  still there. I called West. The problem  was  their
  223. doing in the first place, maybe they would fix it.  Unfortunately
  224. for  me,  the  Vector I was made obsolete by the  Vector  II  the
  225. previous  year.  West planned no more software upgrades  for  the
  226. Vector  I,  and it would be prohibitively expensive for  them  to
  227. rewrite the software in response to this one complaint. I  could,
  228. perhaps,  install  the Vector II software (which  corrected  this
  229. bug) but then I would lose some of the features the Vector I  had
  230. that the Vector II lacked. I decided it wasn't worth it.
  231.      There was still some confusion over exactly what data fields
  232. the repeater was looking at. To find out, I wrote a loran simula-
  233. tor  program for my computer (see sidebar). I coded the  data  in
  234. each  of the three fields that displayed bearing, giving  each  a
  235. different  value,  and was able to prove that  the  repeater  was
  236. looking at the APA sentence for its  bearing to display.
  237.      Once again, I called KVH. Rob Solomon, one of KVH's  techni-
  238. cal  people  who had stayed with me throughout this  ordeal,  was
  239. certain  the  new software didn't look at APA  for  bearing.   He
  240. wanted  to look further into the problem, but was unsure when  he
  241. would  be able to find the time to do so. It was early  February,
  242. war  had just broken out in the Persian Gulf and KVH was  in  the
  243. midst  of  delivering 15,000 of its  DataScopes to  Desert  Storm
  244. personnel. He promised to look at the LRX+'s software when things
  245. quieted  down. Oddly enough, he called back in an hour  with  the
  246. LRX+'s  program listing in hand. He told me absolutely  that  the
  247. new software did not look at APA for bearing. Back to the drawing
  248. board...
  249.      I went home that night and ran my simulator again. There was
  250. no  mistake.  I wrote a letter to Rob at KVH. In  it  I  included
  251. everything  I  knew about the problem, a sample of  the  Vector's
  252. data output, the listing of my simulator program, and the version
  253. number  of the software EPROM ("Erasable Programmable  Read  Only
  254. Memory,"  the  chip which stores the software)  installed  in  my
  255. repeater.  I  sent it off by FAX the following day.  A  few  days
  256. later,  I called Rob to see if he had gotten the letter. He  had,
  257. but  had not yet read it. When he did, he saw that I hadn't  been
  258. given the software he asked for. He sent a new EPROM chip in  the
  259. mail (the right one, this time)  for me to put in myself. I  did,
  260. and it worked as promised. My problem was solved, but only  after
  261. five months had passed and I had spent many hours on testing  and
  262. investigation.
  263.      I had better luck regarding the autopilot. Late last summer,
  264. wisened by my experience with the repeater (I had just begun  the
  265. process  of sorting out its  troubles), I called West Marine  and
  266. spoke  to  Dave  Wells, their technical support  person  for  the
  267. Vector. I was determined to find out whether the  loran/autopilot
  268. interface  would work before I bought it. He told me  the  Vector
  269. and the Navico pilot were compatible. He had tested them himself.
  270. I bought the programmer and sent away for the junction box.  When
  271. it arrived, the manual informed me that my pilot would require  a
  272. software upgrade from the factory in order to work properly  with
  273. my loran (sound familiar?). It was by then late fall and I  would
  274. not be needing the pilot for months, so I sent it off to Navico's
  275. Largo,  FL plant. When it came back, I hooked the  loran,  pilot,
  276. programmer  and  junction box together in my study  to  see  what
  277. would  happen.  The system worked as advertised. This  time,  the
  278. "promise" was fulfilled.
  279.  
  280.  
  281.                  Conclusions and Recommendations
  282.  
  283.      My story has a happy ending. Come spring, I will be install-
  284. ing my new toys and enjoying them all summer. Others who try this
  285. may  not be so fortunate. The NMEA system can work, but there  is
  286. no  guarantee  in any particular case that it will.  My  repeater
  287. adventure  shows what sort of problems you can have, and to  what
  288. lengths you may have to go in order to solve them.
  289.      My  recommendations are these: Do your homework  before  you
  290. buy. If you are buying from a supplier who will do the  installa-
  291. tion for you, make sure he will guarantee the satisfactory opera-
  292. tion of the interface. If you will do the installation  yourself,
  293. try  to arrange for a full credit return in the event the  inter-
  294. faces  prove to be incompatible. Call the manufacturers  and  ask
  295. questions. Take the time to understand what the NMEA 0183  stand-
  296. ard is and how it works.
  297.      If  you find that you've been stuck anyway all is  not  com-
  298. pletely lost. A company called Maricom Electronics, at 2911 River
  299. Drive, Thunderbolt, GA 31404 (phone (912) 354-4542) markets  what
  300. it  calls  a "Universal Marine Interface." For just  under  $400,
  301. this box claims to take data in any format that any talker  might
  302. emit and put it into a form any listener will understand. In  the
  303. absence of less extreme solutions, this may be worth trying.
  304.  
  305.  
  306.      Have  a problem to solve, or a solution to share? Send  your
  307. comments and queries to the address above. If you require a quick
  308. answer,  please include a self addressed, stamped envelope.  Your
  309. submissions on computer disk (IBM format, any size) will make  my
  310. job  easier, but your paper submissions are, as always,  welcomed
  311. and appreciated. Until next time...
  312.  
  313. SIDEBAR A:
  314.                  NMEA 0183: DECIPHERING THE CODE
  315.  
  316.      The  "language" of NMEA 0183 is extensive but not  difficult
  317. to  understand.  The  ground rules are  these:  maximum  sentence
  318. length is 80 characters including the starting "$," the terminat-
  319. ing  <CR><LF>, and everything in between. Minimum number of  data
  320. fields is two, including the address field (talker identifier and
  321. sentence format). If data for any field is unavailable, a  "null"
  322. field,  two commas with nothing between them (",,") can  be  sent
  323. instead.
  324.      Here  is a sampling of two letter talker  identifier  codes.
  325. There are others, for everything from satellite communications to
  326. atomic  clocks,  but these are some of the most familiar  to  the
  327. recreational  sailor.
  328.  
  329.   LC   Loran-C
  330.   GP   GPS
  331.   TR   Transit SATNAV
  332.   AP   Autopilot (magnetic)
  333.   HC   Magnetic heading compass
  334.   RA   Radar
  335.   SD   Depth sounder
  336.   VW   Mechanical speed log
  337.  
  338.      Now  for  some of the more common sentences  that  might  be
  339. spoken  by  your LORAN, SATNAV, or GPS. This is  not  a  complete
  340. listing,  but  should  illustrate how the system  works.  In  the
  341. following  examples,  the character "#" will denote  some  number
  342. (0-9). Remember that each of these sentences would be preceded by
  343. the  start character "$" and the two letter talker ID. Each  also
  344. would be followed by the sentence terminator, <CR><LF>.
  345.  
  346. Geographic Location in Lat/Lon
  347.   field #:  0   1      2  3       4
  348.  sentence: GLL,####.##,N,#####.##,W
  349. 1, Lat (deg, min, hundredths); 2, North or South; 3, Lon; 4, West
  350. or East.
  351.  
  352. Geographic Location in Time Differences
  353.   field #:  0   1       2       3       4       5
  354.  sentence: GTD,#####.#,#####.#,#####.#,#####.#,#####.#
  355. 1-5, TD's for secondaries 1 through 5, respectively.
  356.  
  357. Bearing to Dest wpt from Origin wpt
  358.   field #:  0   1  2  3  4  5    6
  359.  sentence: BOD,###,T,###,M,####,####
  360. 1-2, brg,True; 3-4, brg, Mag; 5, dest wpt; 6, org wpt.
  361.  
  362. Vector Track and Speed Over Ground (SOG)
  363.   field #:  0   1  2  3  4  5   6  7   8
  364.  sentence: VTG,###,T,###,M,##.#,N,##.#,K
  365. 1-2,  brg,  True; 3-4, brg, Mag; 5-6, speed, kNots;  7-8,  speed,
  366. Kilometers/hr.
  367.  
  368. Cross Track Error
  369.   field #:  0  1 2  3   4 5
  370.  sentence: XTE,A,A,#.##,L,N
  371. 1, blink/SNR (A=valid, V=invalid); 2, cycle lock (A/V); 3-5, dist
  372. off, Left or Right, Nautical miles or Kilometers.
  373.  
  374. Autopilot (format A)
  375.   field #:  0  1 2  3   4 5 6 7  8  9  10
  376.  sentence: APA,A,A,#.##,L,N,A,A,###,M,####
  377. 1,  blink/SNR (A/V); 2 cycle lock (A/V); 3-5, dist off,  Left  or
  378. Right, Nautical miles or Kilometers; 6-7, arrival circle, arrival
  379. perpendicular (A/V); 8-9, brg, Magnetic; 10, dest wpt.
  380.  
  381. Bearing to Waypoint along Great Circle
  382.  fld:  0   1      2      3  4       5  6  7  8  9  10  11  12
  383.  sen: BWC,HHMMSS,####.##,N,#####.##,W,###,T,###,M,###.#,N,####
  384. 1, Hours, Minutes, Seconds of universal time code; 2-3, Lat, N/S;
  385. 4-5,  Lon,  W/E;  6-7, brg, True; 8-9, brg,  Mag;  10-12,  range,
  386. Nautical miles or Kilometers, dest wpt.
  387.  
  388. BWR:  Bearing  to Waypoint, Rhumbline, BPI: Bearing to  Point  of
  389. Interest, all follow data field format of BWC.
  390.  
  391.      For  a full explanation of the NMEA 0183 standard,  you  can
  392. write  or call the NMEA. For a fee, they will send you the  their
  393. 36 page booklet "NMEA 0183 Standard for Interfacing Marine  Elec-
  394. tronic  Navigational  Devices." The address is:  National  Marine
  395. Electronics  Association, PO Box 50040, Mobile, AL  36605.  Phone
  396. (205) 473-1793.
  397.  
  398.  
  399. Sidebar B:
  400.                    LISTENING IN, SPEAKING OUT:
  401.      Using your Home Computer to Monitor NMEA Communications
  402.  
  403.      The data that comes out of your loran or other NMEA equipped
  404. gear  is in the same format as that from your personal  computer.
  405. It is possible, and very easy to take a look at what your talkers
  406. are  saying,  and to speak to your listeners in a form  they  can
  407. understand.
  408.      To listen in, you need a PC equipped with a serial  (RS-232)
  409. interface and modem program (such as HAYES SmartCom or CTRM).  If
  410. your  program has a data capture feature, you can read data  from
  411. the line into a file for later use.
  412.      To  make the connection, connect the NMEA signal line  (line
  413. A,  output, etc) to the RS-232 "receive data" line (#2 on  9  pin
  414. or  #3 on 25 pin connectors), and the NMEA ground line  (line  B,
  415. return, etc) to the RS-232 "signal ground" (#5 on 9 pin or #7  on
  416. 25 pin connectors).
  417.      The  statistics for NMEA 0183 are as follows: 4800  baud,  8
  418. data  bits,  1 stop bit, no parity. Set your  modem  program  for
  419. these  parameters. Switch on your loran (or other talker),  start
  420. the modem program, and the data should come pouring in.
  421.      One  note  of caution regarding  radionavigation  receivers:
  422. they are very sensitive to the kind of RF interference computers,
  423. fluorescent  lights, TV's and other such things cause.  Your  re-
  424. ceiver may not be able to lock on to its  transmitters with these
  425. things operating nearby, and you may have to set up the  receiver
  426. in  another room and connect it with a long cable for it to  work
  427. properly.
  428.      Speaking to your listeners is only slightly more  complicat-
  429. ed.  You need to send the data strings over and over again  at  a
  430. repetition  rate  of once every few seconds (but no  faster  than
  431. once  every second). For this, I wrote a short simulator  program
  432. in BASIC that does the job, and allows me to program in the  text
  433. I want to send. The connection is different, also. This time  you
  434. will  have  to connect the NMEA signal line to  RS-232  "transmit
  435. data"  (#3 on 9 pin or #2 on 25 pin connectors), and NMEA  ground
  436. to  RS-232 signal ground (as before). In addition,  you  probably
  437. will have to bring the RS-232 "data set ready" (DSR) terminal  to
  438. a  low  voltage. You can do this by inserting  a  jumper  between
  439. "data  terminal  ready" (DTR, normally #4 on 9 pin or #20  on  25
  440. pin) and DSR (#6 on 9 or 25 pin setups).
  441.      Here is the text of my NMEA 0183 simulator program:
  442.  
  443. 5   REM LORAN SIMULATOR PROGRAM - Wayne Simpson, 1991
  444. 10  OPEN "com2:4800,n,8,1,RS" FOR OUTPUT AS#1
  445. 15  REM setup RS-232 to parameters and disable request to send
  446. 100 A$="$LCGLL,4004.22,N,07409.78,W"
  447. 110 B$="$LCBWC,,4001.80,N,07403.66,W,100,T,200,M,005.2,N,011"
  448. 120 C$="$LCAPA,V,A,0.25,R,N,V,V,300,T,011"
  449. 130 D$="$LCVTG,,,268,M,02.1,N,,"
  450. 140 E$=""
  451. 200 PRINT A$    'print GLL statement to screen
  452. 205 PRINT#1,A$  'send GLL over interface
  453. 210 PRINT B$    'BWC to screen
  454. 215 PRINT#1,B$  'BWC to interface
  455. 220 PRINT C$    'APA to screen
  456. 225 PRINT#1,C$  'APA to interface
  457. 230 PRINT D$    'VTG to scren
  458. 235 PRINT#1,D$  'VTG to interface
  459. 240 PRINT E$    'empty line to screen
  460. 245 PRINT#1,E$  'empty line to interface
  461. 300 FOR I=1 TO 12000
  462. 310 NEXT
  463. 320 GOTO 200
  464. 330 REM line 300 provides the 2 second rep rate
  465. 340 REM line 320 repeats the transmission over and over
  466. 350 REM use ctrl-brk keystroke to terminate transmission
  467.  
  468.      Load  this program into your computer, substitute  into  the
  469. A$-E$  variables whatever it is you want to say, and run it.  You
  470. are  now speaking NMEA, and can do a fair job of  troubleshooting
  471. interface problems this way.
  472.  
  473.